package com.irdstudio.apicenter.console.service.authenticate;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.irdstudio.apicenter.console.dm.AppNotice;
import com.irdstudio.apicenter.console.dm.AppNoticeDao;

@Service(value = "appNoticeService")
public class AppNoticeService {

	@Autowired
	private AppNoticeDao appNoticeDao;

	public int insertOne(AppNotice appNotice) throws SQLException,
			ClassNotFoundException {
		return appNoticeDao.save(appNotice);
	}

	public AppNotice queryAppTradePrivate(String recordKey) throws SQLException {
		return appNoticeDao.queryWithKeys(recordKey);
	}

	public int update(AppNotice appNotice) throws SQLException,
			ClassNotFoundException {
		return appNoticeDao.update(appNotice);
	}

	public int delete(String recordKey) throws SQLException,
			ClassNotFoundException {
		return appNoticeDao.delete(recordKey);
	}

}
